<template>
  <view class="package" v-for="item in fillList" :key="item.id" @click="jump(item.id) ">
    <view class="space-between">
      <view>加注机别名</view>
      <view>{{item.name?item.name:item.code}}{{item.code?'('+item.id+')':''}}</view>
    </view>
    <view class="space-between top">
      <view>存量</view>
      <view>{{item.amount?item.amount:item.count}}公斤</view>
    </view>
  </view>
</template>

<script setup lang="ts">
  const props = defineProps({
    fillList: { type: Array },
  });
  const emit = defineEmits(['jump']);
  function jump(num : number) {
    emit('jump', num)
  }
</script>

<style scoped lang="less">
  .top {
    margin-top: 15rpx;
  }
</style>